class AhobListController
  
  def self.respond_to model, request, config, store
    #TODO: validate data (existing model)
    # load template variables
    title = 'All'
    req = nil
    if (request.env['REQUEST_ARRAY'].count === 2)
      title = request.env['REQUEST_ARRAY'][1]
      req = title
    end
    objects = store.get_objects req
    home = request.env['HTTP_HOST']

    #load template and send it back
    response = Rack::Response.new
    response.headers['Content-Type'] = 'text/html'
    response.write ERB.new(store.get_value('/model/AhobList/template')).result(binding)
    return response
  end
  
end